package com.token.util.sms;
import java.security.SecureRandom;
import java.util.Random;

/**
 * Created by Zhang on 2018/10/2.
 *
 */
public class SmsMark {
    //短信模板
    public static  final  String SMS_MARK="SMS_171750836";//  SMS_150174332
    public static  final  String SMS_MARKZK="SMS_171851209";//  SMS_171851209 回执
    public static  final  String accessKeyId="LTAIwXdy7897ELpc";
    public static  final  String accessKeySecret="HLUaS8b4Mv9aLv57JLIpbgPjLP5Vqg";

    private static final Random RANDOM = new SecureRandom();
    private static final String SYMBOLS = "0123456789"; // 数字


    /**
         * 获取长度为 6 的随机数字
         * @return 随机数字
         * @date 修改日志：由 space 创建于 2018-8-2 下午2:43:51
         */
        public static String getCode() {

            // 如果需要4位，那 new char[4] 即可，其他位数同理可得
            char[] nonceChars = new char[6];

            for (int index = 0; index < nonceChars.length; ++index) {
                nonceChars[index] = SYMBOLS.charAt(RANDOM.nextInt(SYMBOLS.length()));
            }

            return new String(nonceChars);
        }

}
